// LetOffline.cpp : implementation file
//

#include "stdafx.h"
#include "LetOffline.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CLetOffline dialog


CLetOffline::CLetOffline(CWnd* pParent /*=NULL*/)
	: CDialog(CLetOffline::IDD, pParent)
{
	//{{AFX_DATA_INIT(CLetOffline)
	m_attack_relay = 5000;
	m_attack_times = 100;
	//}}AFX_DATA_INIT
}


void CLetOffline::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CLetOffline)
	DDX_Control(pDX, IDC_IP_ATTACK, m_attack_ip);
	DDX_Text(pDX, IDC_ATTACK_REALAY, m_attack_relay);
	DDV_MinMaxUInt(pDX, m_attack_relay, 500, 10000000);
	DDX_Text(pDX, IDC_ATTACK_TIMES, m_attack_times);
	DDV_MinMaxUInt(pDX, m_attack_times, 1, 100000);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CLetOffline, CDialog)
	//{{AFX_MSG_MAP(CLetOffline)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CLetOffline message handlers

//DEL int CLetOffline::DoModal(USERDATA *UserData) 
//DEL {
//DEL 	// TODO: Add your specialized code here and/or call the base class
//DEL 	//CDialog::DoModal();
//DEL 	//Dot1X = new CDot1X(GetSafeHwnd());
//DEL 	//m_offlineinfo.Dot1X= Dot1X;
//DEL 	//memcpy(m_offlineinfo.selfip,UserData->ip,4);
//DEL 	return CDialog::DoModal();
//DEL }

//DEL void CLetOffline::OnOK() 
//DEL {
//DEL 	//CDialog::OnOK();
//DEL 	// TODO: Add extra validation here
//DEL 	//m_offlineinfo.Dot1X=Dot1X;
//DEL 	m_offlineinfo.nRelay=m_attack_relay;
//DEL 	m_offlineinfo.nTimes=m_attack_times;
//DEL 	m_attack_ip.GetAddress(m_offlineinfo.ip[0],m_offlineinfo.ip[1],m_offlineinfo.ip[2],m_offlineinfo.ip[3]);
//DEL 	//m_hThreadARP=::CreateThread(NULL, 0, SendARPProc, &m_offlineinfo, 0, NULL);
//DEL }
//DEL void CLetOffline::OnRecvMessage(WPARAM wParam,LPARAM lParam)
//DEL {
//DEL 		GetDlgItem(IDC_STATIC_LETOFF)->SetWindowText((char*)lParam);
//DEL 		switch((char)wParam)
//DEL 		{
//DEL 		case 1:
//DEL 			break;
//DEL 		case -1:
//DEL 			break;
//DEL 		case -2:
//DEL 			break;
//DEL 		default:
//DEL 			;
//DEL 		}
//DEL }

void CLetOffline::OnOK() 
{
	// TODO: Add extra validation here
	m_attack_ip.GetAddress((ULONG)m_ip);
	CDialog::OnOK();
}
